package com.atech.ebayadmin.common;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;

import com.ebay.soap.eBLBaseComponents.BuyerPaymentMethodCodeType;
import com.ebay.soap.eBLBaseComponents.CurrencyCodeType;
import com.ebay.soap.eBLBaseComponents.ListingDurationCodeType;
import com.ebay.soap.eBLBaseComponents.ListingTypeCodeType;
import com.ebay.soap.eBLBaseComponents.ShippingServiceCodeType;
import com.ebay.soap.eBLBaseComponents.SiteCodeType;

public class MdConstConfig {
	public static HashMap allPaymentMethods = new HashMap();
	public static Map allListingDurations = new HashMap();
	public static Map allListingTypes = new HashMap();
	public static Map allSiteCode = new HashMap();
	public static List<String> allCurrencyID = new ArrayList<String>();
	public static Map allShippingService = new HashMap();
	// Add for create record
	public static Map prodType = new TreeMap();
	public static Map prodClass = new TreeMap();
	public static Map equipClass = new TreeMap();
	public static Map fiberType = new TreeMap();
	public static Map currStatus = new TreeMap();
	static{
		setAllPaymentMethods();
		setAllListingDurations();
		setAllListingTypes();
		setAllSiteCode();
		setAllCurrencyID();
		setAllShippingService();
		// Add for create record
		setProdType();
		setProdClass();
		setEquipClass();
		setFiberType();
		setCurrStatus();
	}
	public static Map setAllPaymentMethods(){
		allPaymentMethods.put(BuyerPaymentMethodCodeType.AM_EX.value(), "American Express");
		allPaymentMethods.put(BuyerPaymentMethodCodeType.CASH_IN_PERSON.value(), "Cash-in-person option");
		allPaymentMethods.put(BuyerPaymentMethodCodeType.CASH_ON_PICKUP.value(), "Payment on delivery");
		allPaymentMethods.put(BuyerPaymentMethodCodeType.CC_ACCEPTED.value(), "Credit card");
		allPaymentMethods.put(BuyerPaymentMethodCodeType.COD.value(), "Cash on delivery");
		allPaymentMethods.put(BuyerPaymentMethodCodeType.DISCOVER.value(), "Discover card");
		allPaymentMethods.put(BuyerPaymentMethodCodeType.ELV.value(), "Elektronisches Lastschriftverfahren (direct debit).");
		allPaymentMethods.put(BuyerPaymentMethodCodeType.MOCC.value(), "Money order/cashiers check");
		allPaymentMethods.put(BuyerPaymentMethodCodeType.MONEYBOOKERS.value(), "Moneybookers");
		allPaymentMethods.put(BuyerPaymentMethodCodeType.PAY_PAL.value(), "PayPal");
		allPaymentMethods.put(BuyerPaymentMethodCodeType.PERSONAL_CHECK.value(), "Personal check");
		allPaymentMethods.put(BuyerPaymentMethodCodeType.PRO_PAY.value(), "ProPay");
		allPaymentMethods.put(BuyerPaymentMethodCodeType.VISA_MC.value(), "Visa/Mastercard");
		return allPaymentMethods;
	}
	
	public static Map setAllListingDurations(){
		allListingDurations.put(ListingDurationCodeType.GTC.value(), "GTC");
		allListingDurations.put(ListingDurationCodeType.DAYS_1.value(), "1 Day");
		allListingDurations.put(ListingDurationCodeType.DAYS_3.value(), "3 Days");
		allListingDurations.put(ListingDurationCodeType.DAYS_5.value(), "5 Days");
		allListingDurations.put(ListingDurationCodeType.DAYS_7.value(), "7 Days");
		allListingDurations.put(ListingDurationCodeType.DAYS_10.value(), "10 Days");
		allListingDurations.put(ListingDurationCodeType.DAYS_14.value(), "14 Days");
		allListingDurations.put(ListingDurationCodeType.DAYS_21.value(), "21 Days");
		allListingDurations.put(ListingDurationCodeType.DAYS_30.value(), "30 Days");
		allListingDurations.put(ListingDurationCodeType.DAYS_60.value(), "60 Days");
		allListingDurations.put(ListingDurationCodeType.DAYS_90.value(), "90 Days");
		allListingDurations.put(ListingDurationCodeType.DAYS_120.value(), "120 Days");
		
		return allListingDurations;
	}
	
	public static Map setAllListingTypes(){
		
		allListingTypes.put(ListingTypeCodeType.AD_TYPE.value(), "Advertisement");
		allListingTypes.put(ListingTypeCodeType.AUCTION.value(), "Auction");
		allListingTypes.put(ListingTypeCodeType.CHINESE.value(), "Chinese");		
		allListingTypes.put(ListingTypeCodeType.CUSTOM_CODE.value(), "Reserved");
		allListingTypes.put(ListingTypeCodeType.DUTCH.value(), "Dutch");
		allListingTypes.put(ListingTypeCodeType.EXPRESS.value(), "Express");
		allListingTypes.put(ListingTypeCodeType.FIXED_PRICE_ITEM.value(), "Fixed Price Item");
		allListingTypes.put(ListingTypeCodeType.HALF.value(), "Half");
		allListingTypes.put(ListingTypeCodeType.LEAD_GENERATION.value(), "Lead Generation");
		allListingTypes.put(ListingTypeCodeType.LIVE.value(), "Live");
		allListingTypes.put(ListingTypeCodeType.PERSONAL_OFFER.value(), "Personal Offer");
		allListingTypes.put(ListingTypeCodeType.SHOPPING.value(), "Shopping");	
		allListingTypes.put(ListingTypeCodeType.STORES_FIXED_PRICE.value(), "Stores Fixed Price");
		allListingTypes.put(ListingTypeCodeType.UNKNOWN.value(), "Unknown");
		return allListingTypes;
	}
	
	public static Map setAllSiteCode(){
		
		allSiteCode.put(SiteCodeType.AUSTRALIA.value(), "Australia");	
//		allSiteCode.put(SiteCodeType.AUSTRIA.value(), "Austria");	
//		allSiteCode.put(SiteCodeType.BELGIUM_DUTCH.value(), "Belgium(Dutch)");	
//		allSiteCode.put(SiteCodeType.BELGIUM_FRENCH.value(), "Belgium(French)");
//		allSiteCode.put(SiteCodeType.CANADA.value(), "Canada");	
//		allSiteCode.put(SiteCodeType.CANADA_FRENCH.value(), "CanadaFrench");
//		allSiteCode.put(SiteCodeType.CHINA.value(), "China");
//		allSiteCode.put(SiteCodeType.CUSTOM_CODE.value(), "Custom");
//		allSiteCode.put(SiteCodeType.E_BAY_MOTORS.value(), "eBay Motors");
		allSiteCode.put(SiteCodeType.FRANCE.value(), "France");
		allSiteCode.put(SiteCodeType.GERMANY.value(), "Germany");
//		allSiteCode.put(SiteCodeType.HONG_KONG.value(), "Hong Kong");
//		allSiteCode.put(SiteCodeType.INDIA.value(), "India");
//		allSiteCode.put(SiteCodeType.IRELAND.value(), "Ireland");
//		allSiteCode.put(SiteCodeType.ITALY.value(), "Italy");
//		allSiteCode.put(SiteCodeType.MALAYSIA.value(), "Malaysia");
//		allSiteCode.put(SiteCodeType.NETHERLANDS.value(), "Netherlands");
//		allSiteCode.put(SiteCodeType.PHILIPPINES.value(), "Philippines");
//		allSiteCode.put(SiteCodeType.POLAND.value(), "Poland");
//		allSiteCode.put(SiteCodeType.SINGAPORE.value(), "Singapore");
//		allSiteCode.put(SiteCodeType.SPAIN.value(), "Spain");
//		allSiteCode.put(SiteCodeType.SWEDEN.value(), "Sweden");
//		allSiteCode.put(SiteCodeType.SWITZERLAND.value(), "Switzerland");
//		allSiteCode.put(SiteCodeType.TAIWAN.value(), "Taiwan");
		allSiteCode.put(SiteCodeType.UK.value(), "United Kingdom");
		allSiteCode.put(SiteCodeType.US.value(), "USA");
		return allSiteCode;
	}
	public static List<String> setAllCurrencyID(){
		for(CurrencyCodeType code: CurrencyCodeType.values())
		{
			allCurrencyID.add(code.value());
		}
		
		return allCurrencyID;
	}
	public static Map setAllShippingService() {
		allShippingService.put(ShippingServiceCodeType.UPS_2_DAY_AIR_AM.value(), "UPS Next Day Air");
		allShippingService.put(ShippingServiceCodeType.UPS_2_ND_DAY.value(), "UPS 2nd Day");
		allShippingService.put(ShippingServiceCodeType.UPS_3_RD_DAY.value(), "UPS 3rd Day");
		allShippingService.put(ShippingServiceCodeType.UPS_GROUND.value(), "UPS Ground");
		allShippingService.put(ShippingServiceCodeType.UPS_NEXT_DAY.value(), "UPS Next Day");
		allShippingService.put(ShippingServiceCodeType.UPS_NEXT_DAY_AIR.value(), "UPS Next Day Air");
		allShippingService.put(ShippingServiceCodeType.UPS_STANDARD_TO_CANADA.value(), "UPS Standard To Canada");
		allShippingService.put(ShippingServiceCodeType.UPS_WORLD_WIDE_EXPEDITED.value(), "UPS Worldwide Expedited");
		allShippingService.put(ShippingServiceCodeType.UPS_WORLD_WIDE_EXPRESS.value(), "UPS Worldwide Express");
		allShippingService.put(ShippingServiceCodeType.UPS_WORLD_WIDE_EXPRESS_BOX_10_KG.value(), "UPS Worldwide Express Box 10 Kg");
		allShippingService.put(ShippingServiceCodeType.UPS_WORLD_WIDE_EXPRESS_BOX_25_KG.value(), "UPS Worldwide Express Box 25 Kg");
		allShippingService.put(ShippingServiceCodeType.UPS_WORLD_WIDE_EXPRESS_PLUS.value(), "UPS Worldwide Express Plus");
		allShippingService.put(ShippingServiceCodeType.UPS_WORLD_WIDE_EXPRESS_PLUS_BOX_10_KG.value(), "UPS Worldwide Express Plus Box 10 Kg");
		allShippingService.put(ShippingServiceCodeType.UPS_WORLD_WIDE_EXPRESS_PLUS_BOX_25_KG.value(), "UPS Worldwide Express Plus box 25 Kg");
		allShippingService.put(ShippingServiceCodeType.UPS_WORLDWIDE_SAVER.value(), "UPS Worldwide Saver");
		return allShippingService;
	}
	// Add for create record
	public static Map setProdType() {
		prodType.put("1", "固定资产");
		prodType.put("2", "耗材");
		return prodType;
	}
	public static Map setProdClass() {
		prodClass.put("1", "设备");
		prodClass.put("2", "光缆");
		prodClass.put("3", "其它");
		return prodClass;
		
	}
	public static Map setEquipClass() {
		equipClass.put("1", "网络设备");
		equipClass.put("2", "辅助设备");
		equipClass.put("3", "其它");
		return equipClass;
		
	}
	public static Map setFiberType() {
		fiberType.put("1", "主干光缆");
		fiberType.put("2", "引接光缆");
		fiberType.put("3", "分支光缆");
		fiberType.put("4", "其它");
		return fiberType;
	}
	public static Map setCurrStatus() {
		currStatus.put("1", "正常使用");
		currStatus.put("2", "故障");
		currStatus.put("3", "拆除");
		currStatus.put("4", "正在维修");
		currStatus.put("5", "库存备用");
		currStatus.put("6", "报废");
		currStatus.put("7", "借出");
		currStatus.put("8", "借入");
		return currStatus;
	}
}
